[QUIZ] Test your understanding of SQL - Part 7

  1. Question 1: What is the result of the following SQL statement?
     SELECT COUNT(DISTINCT STUDENT_ID) FROM EXAM_RESULTS; 
    1. 3
    2. 4
    3. 5
    4. 6
  2. Question 2: Which SQL statement is used to calculate the average test score for the 1st test?
    1. SELECT AVG (DIEM_KT) FROM KETQUA_KIEMTRA;
    2. SELECT AVG (DIEM_KT) FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 1;
    3. SELECT AVG (DIEM_KT) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
    4. SELECT COUNT (DIEM_KT) FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 1;
  3. Question 3: Which SQL statement is used to calculate each test how many students have done?
    1. SELECT COUNT (DISTINCT ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
    2. SELECT ID_BAIKT, MAX (ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
    3. SELECT ID_BAIKT, COUNT (DISTINCT ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
    4. SELECT ID_BAIKT, MIN (ID_SV) FROM KETQUA_KIEMTRA GROUP BY ID_BAIKT;
  4. Question 4: Which SQL statement is used to print out the record of all students who start with 'L'?
    1. SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV LIKE 'L%';
    2. SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV LIKE 'L';
    3. SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV = 'L';
    4. SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV <> 'L';
  5. Question 5: What is the result of the following SQL statement?
     SELECT MAX(DIEM_KT) FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 1 AND HO_SV LIKE '%U%'; 
    1. 95
    2. 85
    3. 100
    4. 78
  6. Question 6: Which SQL statement is used to print out the records of all students whose first or last name ends with 'N'?
    1. SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE '% N' OR HO_SV LIKE '% N';
    2. SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE 'N' OR HO_SV LIKE 'N';
    3. SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE 'N%' OR HO_SV LIKE 'N%';
    4. SELECT * FROM KETQUA_KIEMTRA WHERE TEN_SV LIKE '% N%' OR HO_SV LIKE '% N%';
  7. Question 7: Which SQL statement is used to find the names of all students who score higher than 90 on the 2nd test?
    1. SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 2 OR DIEM_KT> 90;
    2. SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 2 AND DIEM_KT> 90;
    3. SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE DIEM_KT> 90;
    4. SELECT TEN_SV, HO_SV FROM KETQUA_KIEMTRA WHERE ID_BAIKT = 2 HAVING DIEM_KT> 90;
  8. Question 8: Which SQL statement is used to find the names of all students who scored a total of 2 tests higher than 180?
    1. SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA GROUP BY TEN_SV, HO_SV;
    2. SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA HAVING SUM (DIEM_KT)> 180;
    3. SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA GROUP BY TEN_SV, HO_SV HAVING SUM (DIEM_KT)> 180;
    4. SELECT TEN_SV, HO_SV, SUM (DIEM_KT) FROM KETQUA_KIEMTRA WHERE DIEM_KT> 180 GROUP BY TEN_SV, HO_SV;
  9. Question 9: How many records have the following SQL statement generated?
     SELECT * FROM KETQUA_KIEMTRA WHERE HO_SV LIKE '%U%' AND DIEM_KT > 75; 
    1. 3
    2. 4
    3. 5
    4. There is no answer
  10. Question 10: How many records do the following SQL statements return?
     SELECT * FROM KETQUA_KIEMTRA WHERE ID_SV <= 12 AND DIEM > 85; 
    1. 5
    2. 4
    3. 3
    4. 2
3.5 ★ | 2 Vote

May be interested

  • Test of CSS knowledge - Part 5Photo of Test of CSS knowledge - Part 5
    set of multiple choice questions about css programming language, invite readers to test their knowledge on this topic. with 15 questions including many answers, choose the best answer.
  • Test of CSS knowledge - Part 6Photo of Test of CSS knowledge - Part 6
    test your knowledge of css with interesting multiple choice questions.
  • Test of CSS knowledge - Part 7Photo of Test of CSS knowledge - Part 7
    if you are learning about css, the following quiz of network administrator will provide useful knowledge for your learning.
  • Test of CSS knowledge - Part 8Photo of Test of CSS knowledge - Part 8
    set of multiple choice questions about css programming language, invite readers to test their knowledge with 10 questions including many answers, please choose the best answer.
  • Test of CSS knowledge - Part 9Photo of Test of CSS knowledge - Part 9
    read on to continue your knowledge with the sequel to tipsmake.com's css test series. the question set will have 10 sentences to try.
  • You have confidence in your Network Administration knowledge P10Photo of You have confidence in your Network Administration knowledge P10
    in order to become a network administrator, you need to master the knowledge related to this topic. to help readers gain more knowledge about network administration, the following test will give you many useful things.